﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PizzaService.Model;

namespace PizzaService.Entities
{
    /// <summary>
    /// Kunde
    /// </summary>
    public class Kunde : ViewModelBase
    {
        public Kunde()
        {
        }

        public Kunde(Kunde oldCustomer)
        {
            ID = oldCustomer.ID;
            Name = oldCustomer.Name;
            Vorname = oldCustomer.Vorname;
            Telefonnummer = oldCustomer.Telefonnummer;
            PLZ = oldCustomer.PLZ;
            Ort = oldCustomer.Ort;
            Strasse = oldCustomer.Strasse;
            Hausnummer = oldCustomer.Hausnummer;
            Mail = oldCustomer.Mail;
        }

        private long m_ID;
        public long ID
        {
            get { return m_ID; }
            set
            {
                if (value != m_ID)
                {
                    this.m_ID = value;
                    RaisePropertyChanged(() => ID);
                }
            }
        }
        /// <summary>
        /// Name
        /// </summary>
        private string m_Name;
        public string Name
        {
            get { return m_Name; }
            set
            {
                if (value != m_Name)
                {
                    this.m_Name = value;
                    RaisePropertyChanged(() => Name);
                }
            }
        }
        /// <summary>
        /// Vorname
        /// </summary>
        private string m_Vorname;
        public string Vorname
        {
            get { return m_Vorname; }
            set
            {
                if (value != m_Vorname)
                {
                    this.m_Vorname = value;
                    RaisePropertyChanged(() => Vorname);
                }
            }
        }
        /// <summary>
        /// Telefonnummer
        /// </summary>
        private string m_Telefonnummer;
        public string Telefonnummer
        {
            get { return m_Telefonnummer; }
            set
            {
                if (value != m_Telefonnummer)
                {
                    this.m_Telefonnummer = value;
                    RaisePropertyChanged(() => Telefonnummer);
                }
            }
        }
        /// <summary>
        /// PLZ
        /// </summary>
        private string m_PLZ;
        public string PLZ
        {
            get { return m_PLZ; }
            set
            {
                if (value != m_PLZ)
                {
                    this.m_PLZ = value;
                    RaisePropertyChanged(() => PLZ);
                }
            }
        }
        /// <summary>
        /// Ort
        /// </summary>
        private string m_Ort;
        public string Ort
        {
            get { return m_Ort; }
            set
            {
                if (value != m_Ort)
                {
                    this.m_Ort = value;
                    RaisePropertyChanged(() => Ort);
                }
            }
        }
        /// <summary>
        /// Straße
        /// </summary>
        private string m_Straße;
        public string Strasse
        {
            get { return m_Straße; }
            set
            {
                if (value != m_Straße)
                {
                    this.m_Straße = value;
                    RaisePropertyChanged(() => Strasse);
                }
            }
        }
        /// <summary>
        /// Hausnummer
        /// </summary>
        private string m_Hausnummer;
        public string Hausnummer
        {
            get { return m_Hausnummer; }
            set
            {
                if (value != m_Hausnummer)
                {
                    this.m_Hausnummer = value;
                    RaisePropertyChanged(() => Hausnummer);
                }
            }
        }
        /// <summary>
        /// E-Mail
        /// </summary>
        private string m_E_Mail;
        public string Mail
        {
            get { return m_E_Mail; }
            set
            {
                if (value != m_E_Mail)
                {
                    this.m_E_Mail = value;
                    RaisePropertyChanged(() => Mail);
                }
            }
        }
        
    }

}
